//
//  Date+Global.swift
//  DF_Student
//
//  Created by 刘盖 on 2023/12/22.
//  Copyright © 2023 DFJGED. All rights reserved.
//

import Foundation


public extension Date {
    static func convertDateStringToString(_ str: String ,mode: String? ) -> TimeInterval{
        let formatter = DateFormatter()
        formatter.dateFormat = mode ?? "YYYY-MM-dd HH:mm:ss"
        let date = formatter.date(from: str)
        return date?.timeIntervalSince1970 ?? 0
    }
}
